﻿using Coldairarrow.Entity.PB;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;

namespace Coldairarrow.Entity.DTO
{
    public class SaveStockData
    {
        /// <summary>
        /// 请求的清单ID
        /// </summary>
        public MasterData PData { get; set; }
        /// <summary>
        /// 发货通知单ID
        /// </summary>
        public string ShippingId { get; set; }
        public List<PB_DesignMaterialData> subMData { get; set; }
    }
    public class PB_DesignMaterialData
    {

        public string Id { get; set; }
        /// <summary>
        /// 物料主键
        /// </summary>
        public String MaterialId { get; set; }
        /// <summary>
        /// 理论重量
        /// </summary>
        public double? Weight { get; set; }
        /// <summary>
        /// 清单主ID
        /// </summary>
        public string DesignListId { get; set; }
        /// <summary>
        /// 清单子表ID
        /// </summary>
        public string PB_DesignListInfo { get; set; }
        /// <summary>
        /// 实发重量
        /// </summary>
        public double? RealNums { get; set; }
        /// <summary>
        /// 计划发货数量
        /// </summary>
        public double? EstimatedQuantity { get; set; }
        /// <summary>
        /// 设计重量
        /// </summary>
        public double? Nums { get; set; }
        public string Remarks { get; set; }

        public string DesignDetailId { get; set; }
        public double? VersionNumber { get; set; }//

        public int? State { get; set; }//

        /// <summary>
        /// 备货数量
        /// </summary>
        public double? StockVolume { get; set; }
        /// <summary>
        /// 备货数量
        /// </summary>
        public double? StockVolumecache { get; set; }
        /// <summary>
        /// 应备数量
        /// </summary>
        public double? ShouldNumber { get; set; }
        /// <summary>
        /// 货区Id
        /// </summary>
        public string AreaId { get; set; }
        /// <summary>
        /// 货架Id
        /// </summary>
        public string RackId { get; set; }
        /// <summary>
        /// 货位Id
        /// </summary>
        public string LocationId { get; set; }
        /// <summary>
        /// 仓库ID
        /// </summary>
        public string StorId { get; set; }
    }


    public class MasterData
    {
        public String Id { get; set; }
        /// <summary>
        /// 预留数据层级 父级ID 关联的是通知发货单
        /// </summary>
        public string ReserveParent { get; set; }
        /// <summary>
        /// 入库通知单说明/备注说明
        /// </summary>
        public string Memo { get; set; }
        /// <summary>
        /// 预留数据类型
        /// </summary>
        public string ReserveStyleName { get; set; }
        /// <summary>
        /// 预留发货时间
        /// </summary>
        public DateTime? ReserveDeliveryTime { get; set; }
        /// <summary>
        /// 客户名称
        /// </summary>
        public string CusID { get; set; }
        /// <summary>
        /// 客户地址
        /// </summary>
        public string CustomerAddress { get; set; }
        public string CusName { get; set; }

        /// <summary>
        /// 楼号名字
        /// </summary>

        public string BuildingId { get; set; }

        /// <summary>
        /// 发货计划明细编号
        /// </summary>
        public String AssociatedDelivery { get; set; }
    }

    public class AddStepsPickMain : PB_PickUpMain {
        /// <summary>
        /// 步数集合
        /// </summary>
        public List<StepsList> SubData { get; set; }
        public string ParentId { get; set; }
    }

    public class VerifyClose {

        /// <summary>
        /// 备货单id
        /// </summary>
        public string ParentId { get; set; }
        /// <summary>
        /// 是否保存状态 0不能保存 1可以可以保存
        /// </summary>
        public Int32? State { get; set; }
        public List<StepsList> Detail { get; set; }
    }

    /// <summary>
    /// 步数集合
    /// </summary>
    public class StepsList {
        public string key { get; set; }
        /// <summary>
        /// 子级集合
        /// </summary>
        public List<childrenList> childrenList { get; set; }
    }
    /// <summary>
    /// 备货单步数对应物料列表
    /// </summary>
    public class childrenList {

        public string Id { get; set; }
        /// <summary>
        /// 物料主键
        /// </summary>
        public String MaterialId { get; set; }
        /// <summary>
        /// 理论重量
        /// </summary>
        public double? Weight { get; set; }
        /// <summary>
        /// 清单主ID
        /// </summary>
        public string DesignListId { get; set; }
        /// <summary>
        /// 清单子表ID
        /// </summary>
        public string PB_DesignListInfo { get; set; }
        /// <summary>
        /// 实发重量
        /// </summary>
        public Double? RealNums { get; set; }
        /// <summary>
        /// 计划发货数量
        /// </summary>
        public double? EstimatedQuantity { get; set; }
        /// <summary>
        /// 设计重量
        /// </summary>
        public double? Nums { get; set; }
        public string Remarks { get; set; }

       
        public Double? VersionNumber { get; set; }

        public int? State { get; set; }//

        /// <summary>
        /// 备货数量
        /// </summary>
        public double? StockVolume { get; set; }
        /// <summary>
        /// 备货数量
        /// </summary>
        public double? StockVolumecache { get; set; }
        /// <summary>
        /// 应备数量
        /// </summary>
        public Double? ShouldNumber { get; set; }
        /// <summary>
        /// 货区Id
        /// </summary>
        public string AreaId { get; set; }
        /// <summary>
        /// 货架Id
        /// </summary>
        public string RackId { get; set; }
        /// <summary>
        /// 货位Id
        /// </summary>
        public string LocationId { get; set; }
        /// <summary>
        /// 仓库ID
        /// </summary>
        public string StorId { get; set; }
        public string MaterialName { get; set; }
        public string MaterialCode { get; set; }
        public string MaterialSpec { get; set; }
        public string StorageName { get; set; }
       
        /// <summary>
        /// 步数设计数量
        /// </summary>
        public Double? StepNumber { get; set; }
        /// <summary>
        /// 步数
        /// </summary>
        public string StepIndex { get; set; }

        public string StorAreaName { get; set; }
        public Double? StockNumber { get; set; }
        public string onlyId { get; set; }
        public double? ReadyNums { get; set; }
        /// <summary>
        /// 单位
        /// </summary>
        public string groupName { get; set; }

        /// <summary>
        /// 效验状态
        /// </summary>
        public string ValidityStatus { get; set; }

        /// <summary>
        /// 原始物料Id
        /// </summary>
        public string OriginalMaterialId { get; set; }
        /// <summary>
        /// 原始物料名称
        /// </summary>
        public string OriginalMaterialName { get; set; }
        /// <summary>
        /// 原始物料编码
        /// </summary>
        public string OriginalMaterialCode{ get; set; }
    }
    public class ValidityLoction {
        /// <summary>
        /// 货位id
        /// </summary>
        public string LoctionId { get; set; }
        /// <summary>
        /// 物料id
        /// </summary>
        public string MaterailId { get; set; }
        /// <summary>
        /// 应备总数
        /// </summary>
        public double? StockVolume { get; set; }
        /// <summary>
        /// 步级
        /// </summary>
        public string StepIndex { get; set; }
    }


    /// <summary>
    /// 获取备货汇总
    /// </summary>
    public class StepsSummary {
        /// <summary>
        /// 清单id
        /// </summary>
        public string Id { get; set; }
        /// <summary>
        /// 物料名称
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 编码
        /// </summary>
        public string Code { get; set; }
        /// <summary>
        /// 设计总数量
        /// </summary>
        public string RealNums { get; set; }
        /// <summary>
        /// 已备货数量
        /// </summary>
        public string StockVolume { get; set; }
        /// <summary>
        /// 当前步数
        /// </summary>
        public string StepIndex { get; set; }
        //第一步
        public string OneStep { get; set; }
        /// <summary>
        /// 第二步
        /// </summary>
        public string TwoStep { get; set; }
        /// <summary>
        /// 第三步
        /// </summary>
        public string ThreeStep { get; set; }
        /// <summary>
        /// 第四步
        /// </summary>
        public string FourStep { get; set; }
        /// <summary>
        /// 第五步
        /// </summary>
        public string FiveStep { get; set; }
        /// <summary>
        /// 第六步
        /// </summary>
        public string SixStep { get; set; }
        /// <summary>
        /// 第七步
        /// </summary>
        public string SevenStep { get; set; }
        /// <summary>
        /// 第八步
        /// </summary>
        public string EightStep { get; set; }
        /// <summary>
        /// 第九步
        /// </summary>
        public string NineStep { get; set; }
        /// <summary>
        /// 第十步
        /// </summary>
        public string TenStep { get; set; }
        /// <summary>
        /// 已备总数
        /// </summary>
        public string Subtotal { get; set; }
        public string MainId { get; set; }

        public double? ReadyNums { get; set; }

        public string FifteenStep { get; set; }
    }

    /// <summary>
    /// 备货单打印步数
    /// </summary>
    public class PreparationSteps
    {
        
        /// <summary>
        /// 公司
        /// </summary>
        public string Company { get; set; }
        /// <summary>
        ///项目名称
        /// </summary>
        public string ProjectName { get; set; }
        /// <summary>
        /// 楼号
        /// </summary>
        public string Bulider { get; set; }
        /// <summary>
        /// 备货数量
        /// </summary>
        public string StockVolume { get; set; }
        /// <summary>
        /// 已备货数量
        /// </summary>
        public double PreparedQuantity { get; set; }
        /// <summary>
        /// 步级
        /// </summary>
        public string StepIndex { get; set; }
  

    }
public class PreparationStepsSearch
    {
        /// <summary>
        /// 备货单主表id
        /// </summary>
        public string ParentId { get; set; }
        /// <summary>
        /// 步数集合
        /// </summary>
        public List<string> Step { get; set; }
       public string PrinterId { get; set; } 
    }

    public class InventoryDetail {
       /// <summary>
       /// 物料id
       /// </summary>
        public string MaterialId { get; set; }
        /// <summary>
        /// 物料名称
        /// </summary>
        public string MaterialName { get; set; }
        /// <summary>
        /// 物料编码
        /// </summary>
        public string MaterialCode { get; set; }
        /// <summary>
        /// 规格
        /// </summary>
        public string MaterialSpec { get; set; }
        /// <summary>
        /// 成品编码
        /// </summary>
        public string ProductCode { get; set; }
        /// <summary>
        /// 货位
        /// </summary>
        public string LocationId { get; set; }
        /// <summary>
        ///位置
        /// </summary>
        public string StorAreaName { get; set; }
        /// <summary>
        /// 库存可用量
        /// </summary>
        public string StockNumber { get; set; }
        //仓库
        public string StorageName { get; set; }

        [Key, Column(Order = 1)]
        /// <summary>
        /// 唯一值
        /// </summary>
        public string OnlyId { get; set; }
        /// <summary>
        /// 理论重量
        /// </summary>
        public string Weight { get; set; }
        /// <summary>
        /// 单位名称
        /// </summary>
        public string groupName { get; set; }
    }

}
